home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / object_info < prev    next >
Text File  |  2001-02-23  |  6KB  |  121 lines

  1. SYNOPSIS
  2.         #include <objectinfo.h>
  3.         mixed * object_info (object ob, int what)
  4.         mixed * object_info (object ob, int what, int index)
  5.  
  6. DESCRIPTION
  7.         Returns some internal information about object <ob>, collected
  8.         in an array. Argument <what> determines which information is
  9.         returned.
  10.  
  11.         The result is usually an array. However, if <index> is specified,
  12.         the result is the value from position <index> of the array which
  13.         would have been returned normally.
  14.  
  15.         The possible values of <what>, and the indices of the returned
  16.         arrays are defined in the include file <objectinfo.h>, and may
  17.         change in future versions of the driver!
  18.  
  19.  
  20.         <what> == OINFO_BASIC:
  21.  
  22.           This call returns basic information about <ob>:
  23.  
  24.           int [OIB_HEART_BEAT]:       1 if <ob> has a heart_beat, 0 else.
  25.           int [OIB_IS_WIZARD]:        1 if <ob> has the wizard flag set,
  26.                                         0 else.
  27.             This entry is always 0 when set_is_wizard() is not available.
  28.           int [OIB_ENABLE_COMMANDS]:  1 if <ob> can give commands, 0 else.
  29.           int [OIB_CLONE]:            1 if <ob> is a clone, 0 else.
  30.           int [OIB_DESTRUCTED]:       1 if <ob> is destructed, 0 else.
  31.           int [OIB_SWAPPED]:          1 if <ob> is swapped, 0 else.
  32.           int [OIB_ONCE_INTERACTIVE]: 1 if <ob> was once interactive, 0 else.
  33.           int [OIB_RESET_STATE]:      1 if <ob> is (still) reset, 0 else.
  34.           int [OIB_WILL_CLEAN_UP]:    1 if <ob> will call clean_up(), 0 else.
  35.           int [OIB_LAMBDA_REFERENCED]: 1 if <ob> has lambdas, 0 else.
  36.           int [OIB_SHADOW]:           1 if <ob> has a shadow structure tied
  37.                                         to it, 0 if not.
  38.           int [OIB_REPLACED]:         1 if the program for <ob> was replaced,
  39.                                       0 else.
  40.           int [OIB_TOTAL_LIGHT]:  the amount of light <ob> is emitting.
  41.             This entry is always 0 when set_light() is not available.
  42.           int [OIB_NEXT_RESET]:   time of the next reset.
  43.           int [OIB_TIME_OF_REF]:  time of the last call to <ob>
  44.           int [OIB_REF]:          number of references to <ob>
  45.           int [OIB_GIGATICKS] and [OIB_TICKS]: together, these numbers
  46.             give the accumulated evaluation cost spend in <ob>
  47.           int [OIB_SWAP_NUM]:     the swap number for <ob>s program,
  48.                                   or -1 if not swapped.
  49.           int [OIB_PROG_SWAPPED]: 1 if <ob>'s program is swapped, 0 else.
  50.           int [OIB_VAR_SWAPPED]:  1 if <ob>'s variables are swapped, 0 else.
  51.           int [OIB_NAME]:         <ob>'s object name.
  52.           int [OIB_LOAD_NAME]:    <ob>'s load name.
  53.           object [OIB_NEXT_ALL]:  next object in the object list.
  54.           object [OIB_PREV_ALL]:  previous object in the object list.
  55.  
  56.  
  57.         <what> == OINFO_POSITION:
  58.  
  59.           This call returns information about <ob>'s position in the
  60.           global list of objects:
  61.  
  62.           object [OIP_NEXT]: next object in the object list.
  63.           object [OIP_PREV]: previous object in the object list.
  64.           int    [OIP_POS]:  position of <ob> in list, counting from 0 up.
  65.  
  66.           This call can be expensive in computing time.
  67.  
  68.  
  69.         <what> == OINFO_MEMORY:
  70.  
  71.           This call returns information about the program <ob> uses:
  72.  
  73.           int    [OIM_REF]:            number of references to the program.
  74.           string [OIM_NAME]:           name of program.
  75.           int    [OIM_PROG_SIZE]:      size of the program.
  76.           int    [OIM_NUM_FUNCTIONS]:  number of functions in the program.
  77.           int    [OIM_SIZE_FUNCTIONS]: size needed for the function structs.
  78.           int    [OIM_NUM_VARIABLES]:  number of variables in the program.
  79.           int    [OIM_SIZE_VARIABLES]: size needed for the variable structs.
  80.           int    [OIM_NUM_STRINGS]:    number of strings in the program.
  81.           int    [OIM_SIZE_STRINGS]:   size needed for the string pointers.
  82.           int    [OIM_SIZE_STRINGS_DATA]: size needed for the string data,
  83.                                        scaled down according to the extend of
  84.                                        data sharing.
  85.           int    [OIM_SIZE_STRINGS_TOTAL]: unmodified size needed for the
  86.                                        string data.
  87.           int    [OIM_NUM_INHERITED]:  number of inherited programs.
  88.           int    [OIM_SIZE_INHERITED]: size needed for the inherit structs.
  89.           int    [OIM_TOTAL_SIZE]:     total size of the program.
  90.           int    [OIM_DATA_SIZE]:      total size of the values held in the
  91.                                        object's variables, scaled down
  92.                                        according to the extend of data
  93.                                        sharing.
  94.           int    [OIM_DATA_SIZE_TOTAL]: unmodified total size of the values
  95.                                        held in the object's variables
  96.           int    [OIM_NO_INHERIT]:     1 if the program can't be inherited.
  97.           int    [OIM_NO_CLONE]:       1 if the program/blueprint can't be
  98.                                        cloned.
  99.           int    [OIM_NO_SHADOW]:      1 if the program's functions can't be
  100.                                        shadowed.
  101.  
  102.           This call swaps in the program if necessary.
  103.           Note that the OIM_SIZE_xxx entries only give the size spent on
  104.           the structures and pointers, not the size of the variable data,
  105.           function code, and strings themselves.
  106.  
  107. HISTORY
  108.         Introduced in LDMud 3.2.6.
  109.         Changes in LDMud 3.2.7:
  110.           - new basic result OIB_REPLACED.
  111.           - basic result OIB_IS_WIZARD is always 0 if set_is_wizard()
  112.               is not available.
  113.           - basic result OIB_APPROVED is gone.
  114.         LDMud 3.2.8 added OIM_DATA_SIZE to the result of OINFO_MEMORY.
  115.         LDMud 3.2.9 added the index mechanism, OIM_NO_INHERIT, OIM_NO_SHADOW,
  116.           OIM_NO_CLONE, OIM_SIZE_STRINGS_DATA, OIM_SIZE_STRINGS_TOTAL, and
  117.           OIM_DATA_SIZE_TOTAL to the result of OINFO_MEMORY.
  118.  
  119. SEE ALSO
  120.         debug_info(E)
  121.